package com.dragon.object;

import java.lang.reflect.Array;

import java.util.ArrayList;
import java.util.List;

/**
 * Object中getClass方法案例演示
 *
 * @author dragon
 * @since 2019/11/15
 */
public class getClassTest {
    public static void main(String[] args) {
        System.out.println("Object:" + Object.class);
        System.out.println("int:" + int.class.toString());
        System.out.println("double:" + double.class);
        System.out.println("String:" + String.class);
        System.out.println("char:" + char.class);

        int[] array = new int[12];

        System.out.println("intArray:" + array.getClass());

        Object[] objArray = new Object[12];

        System.out.println("ObjectArray:" + objArray.getClass());
        System.out.println("float:" + float.class);
        System.out.println("ArrayList:" + ArrayList.class);
        System.out.println("Comparator Interface:" + Comparable.class);
    }
}


//~ Formatted by Jindent --- http://www.jindent.com
